package com.yxw.job.task.livevod;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.yxw.live_vod_facade.feign.LiveLikeFeignClient;
import com.yxw.live_vod_facade.feign.OnDemandFeignClient;
import com.yxw.yxnet_cd_center.common.utils.BaseDateTime;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 直播点赞定时任务
 * @author fmx
 */
@Component
@Slf4j
public class LiveLikeVideoTask {


    @Autowired
    private LiveLikeFeignClient liveLikeFeignClient;

    /**
     * 直播点赞信息从redis添加到数据库
     */
    @XxlJob("addLiveLikeRecord")
    public ReturnT<String> addVodLikeRecord(String str) {
        log.info("---------直播点赞信息从redis添加到数据库开始：--------" + BaseDateTime.getLongDateTimeString(new Date()));
        liveLikeFeignClient.addLikeRecord();
        log.info("---------直播点赞信息从redis添加到数据库结束：--------" + BaseDateTime.getLongDateTimeString(new Date()));
        return ReturnT.SUCCESS;
    }
}
